/**************************************************************************************************
* Title: SmurfsRigidBody.h
* Author: Gael Huber
* Description: Holds a rigid body used for physics and collision systems.
**************************************************************************************************/
#ifndef __SMURFSRIGIDBODY_H__
#define __SMURFSRIGIDBODY_H__

#include <random>
#include <time.h>
#include "SmurfsVector3.h"
#include "SmurfsMatrix.h"
#include "SmurfsQuaternion.h"

class RigidBody {
public:
	RigidBody(void);	// Constructor
	RigidBody(Vector3 halfWidths, float mass);	// Constructor defining dimensions
	~RigidBody(void);	// Destructor

	Matrix getWorldInertiaTensor(void);		// Calculate and return the inertia tensor in world coordinates

	Quaternion dQ;			// Derivative of the quaternion
	Vector3 controls[3];	// Array of three control points
	Vector3 appliedForce;	// Force applied by the "hand of god"
	Vector3 angularMomentum;	// Angular momentum
	Vector3 tPosition;		// Translational position of rigid body, position of center of mass
	Vector3 tVelocity;		// Translational velocity vector
	Vector3 tAcceleration;	// Translational acceleration vector
	Vector3 aPosition;		// Angular position
	Vector3 aVelocity;		// Angular velocity
	Vector3 aAcceleration;	// Angular acceleration
	Matrix inertiaTensor;	// Moment of Inertia tensor
	Matrix worldInertiaTensor;	// MIT in world frame
	float momentOfIntertia;	// The moment of inertia for the object
	float mass;				// Mass of the body

	Vector3 axisOfRotation;	// Axis by which we rotate
	Quaternion axes;	// Obb axes
	Vector3 halfWidths;	// Halfwidths for the vector
};

#endif

